import { axios } from '@/utils/request'
// 审核模板列表
function getAuditTemplateList (data) {
  return axios({
    url: '/user-service/workflow/template/list',
    method: 'get',
    params: data
  })
}
// 删除审核模板
function deleteAuditTemplate (data) {
  return axios({
    url: '/user-service/workflow/template',
    method: 'delete',
    data
  })
}
// 新增审核模板
function addAuditTemplate (data) {
  return axios({
    url: '/user-service/workflow/template',
    method: 'post',
    data
  })
}
// 编辑审核模板
function editAuditTemplate (data) {
  return axios({
    url: '/user-service/workflow/template',
    method: 'put',
    data
  })
}
// 获取模板信息
function getTemplateInfor (data) {
  return axios({
    url: '/user-service/workflow/template/info',
    method: 'get',
    params: data
  })
}

// 检测审核模板是否已更改
function checkTemplateIsChanged (params) {
  return axios({
    url: '/user-service/workflow/template/' + params.id + '/check',
    method: 'get',
    params
  })
}

export default {
  getAuditTemplateList,
  deleteAuditTemplate,
  addAuditTemplate,
  editAuditTemplate,
  getTemplateInfor,
  checkTemplateIsChanged
}
